package lol.clann.bukkit.pluginboot.util;

import lol.clann.clannboot.annotation.svc.Service;

/**
 * @author pyz
 * @date 2018/9/20 下午8:33
 */
@Service
public class SystemUtils {
    public int getThreadCount() {
        ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
        while (threadGroup.getParent() != null) {
            threadGroup = threadGroup.getParent();
        }
        return threadGroup.activeCount();
    }
}
